home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / NW41BAS.ZIP / NW4XCONN.BAS < prev    next >
Encoding:
BASIC Source File  |  1995-05-17  |  4.9 KB  |  94 lines

  1. 'NW4XCONN.BAS - Visual Basic Interface for Netware 4.X - Connection Declars.
  2. '   Contains function definations for Netware Server Connectivity, and Info.
  3. '   reagrding those connections.
  4. 'Created by Joseph A. DiVito - Seton Hall University
  5. 'Requirements - NW4XCOMM.BAS
  6. 'Corresponds to NWCONNEC.H in the Netware SDK for C/C++
  7. 'Includes some type decalration help from Novell's first release of NIVB
  8.  
  9. Type CONNECT_INFO
  10.     ConnID As Integer
  11.     connectFlags As Integer
  12.     sessionID As Integer
  13.     connNumber As Integer
  14.     serverAddr As String * 12
  15.     serverType As Integer
  16.     ServerName As String * 48
  17.     clientType As Integer
  18.     clientName As String * 48
  19. End Type
  20.  
  21. Type CONN_USE
  22.     systemElapsedTime As Long
  23.     bytesRead As String * 6
  24.     bytesWritten As String * 6
  25.     totalRequestPackets As Long
  26. End Type
  27.  
  28. Type CONN_LIST
  29.     ListOfConnections(125) As Integer
  30. End Type
  31.  
  32. Type NWINET_ADDR
  33.     networkAddr As String * 4
  34.     netNodeAddr As String * 6
  35.     socket As Integer
  36.     connType As Integer  '3.11 and above only: 0=not in use, 2=NCP, 3=AFP
  37. End Type
  38.  
  39. Global Const CONNECTION_AVAILABLE = &H1
  40. Global Const CONNECTION_PRIVATE = &H2                  'obsolete
  41. Global Const CONNECTION_LOGGED_IN = &H4
  42. Global Const CONNECTION_LICENSED = &H4
  43. Global Const CONNECTION_BROADCAST_AVAILABLE = &H8
  44. Global Const CONNECTION_ABORTED = &H10
  45. Global Const CONNECTION_REFUSE_GEN_BROADCAST = &H20
  46. Global Const CONNECTION_BROADCASTS_DISABLED = &H40
  47. Global Const CONNECTION_PRIMARY = &H80
  48. Global Const CONNECTION_NDS = &H100
  49. Global Const CONNECTION_PNW = &H4000
  50. Global Const CONNECTION_AUTHENTICATED = &H8000         'obsolete
  51.  
  52. 'the following are for NWGetConnInfo
  53. 'ALL is VLM, OS2 and NT - NOT NETX
  54. Global Const NW_CONN_TYPE = 1             'returns WORD (VLM)
  55. Global Const NW_CONN_BIND = &H31
  56. Global Const NW_CONN_NDS = &H32
  57. Global Const NW_CONN_PNW = &H33
  58. Global Const NW_AUTHENTICATED = 3  'returns WORD = 1 if authenticated (ALL)
  59. Global Const NW_PBURST = 4         'returns WORD = 1 if pburst (VLM)
  60. Global Const NW_VERSION = 8        'returns WORD (VLM)
  61. Global Const NW_HARD_COUNT = 9     'returns WORD (VLM)
  62. Global Const NW_CONN_NUM = 13      'returns WORD (ALL)
  63. Global Const NW_TRAN_TYPE = 15     'returns WORD (VLM)
  64. Global Const NW_TRAN_IPX = &H21
  65. Global Const NW_TRAN_TCP = &H22
  66. Global Const NW_SESSION_ID = &H8000      'returns WORD) (VLM)
  67. Global Const NW_SERVER_ADDRESS = &H8001  'returns 12 byte address (ALL)
  68. Global Const NW_SERVER_NAME = &H8002     'returns 48 byte string  (ALL)
  69.  
  70. Declare Function NWGetConnInfo Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal connType%, conndata$) As Integer
  71. Declare Function NWLockConnection Lib "NWCALLS.DLL" (ByVal ConnID%) As Integer
  72. 'Below Function for Server 2.2 Only
  73. Declare Function NWGetConnectionUsageStats Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal ConnectionNumber%, StatusBuffer As CONN_USE) As Integer
  74. Declare Function NWGetConnectionInformation Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal ConnNum%, ByVal objectName$, ObjectType%, objectID&, loginTime As DATE_AND_TIME) As Integer
  75. 'internetAddress needs to be Init. to a 10 Char String
  76. Declare Function NWGetInternetAddress Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal ConnNum%, ByVal internetAddress$) As Integer
  77. Declare Function NWGetInetAddr Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal ConnNum%, inetAddr As NWINET_ADDR) As Integer
  78. Declare Sub NWGetMaximumConnection Lib "NWCALLS.DLL" (maxConnection%)
  79. Declare Function NWGetConnectionList Lib "NWCALLS.DLL" (ByVal mode%, connListBuffer%, ByVal connListSize%, numConnection%) As Integer
  80. Declare Function NWGetConnectionStatus Lib "NWCALLS.DLL" (ByVal ConnID%, connInfo As CONNECT_INFO, ByVal connInfoSize%) As Integer
  81. Declare Function NWGetDefaultConnectionID Lib "NWCALLS.DLL" (ConnID%) As Integer
  82. Declare Function NWGetObjectConnectionNumbers Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal objectName$, ByVal ObjectType%, numConnections%, connlist As CONN_LIST, ByVal maxConnections%) As Integer
  83. Declare Function NWGetConnListFromObject Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal objectID&, ByVal searchConnNum&, connListLen%, connlist As CONN_LIST) As Integer
  84. Declare Function NWSetPreferredServer Lib "NWCALLS.DLL" (ByVal ConnID%) As Integer
  85. Declare Function NWGetPrimaryConnectionID Lib "NWCALLS.DLL" (ConnID%) As Integer
  86. Declare Function NWSetPrimaryConnectionID Lib "NWCALLS.DLL" (ByVal ConnID%) As Integer
  87. Declare Function NWGetConnectionHandle Lib "NWCALLS.DLL" (ByVal ServerName$, ByVal mode%, Conn%, ByVal Scope%) as Integer
  88. 'Same Purpose as above function ^^^^^^ but put in for Compatiability
  89. Declare Function NWGetConnectionID Lib "NWCALLS.DLL" (ByVal ServerName$, ByVal mode%, Conn%, ByVal Scope%) as Integer
  90. Declare Function NWGetConnectionNumber Lib "NWCALLS.DLL" (ByVal ConnID%, ConnNum%) As Integer
  91. Declare Function NWClearConnectionNumber Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal ConnNum%) As Integer
  92. Declare Function NWIsIDInUse Lib "NWCALLS.DLL" (ByVal ConnID%) As Integer
  93.  
  94.